//
//  imageFromCache.m
//  PhotoCircle
//
//  Created by wujungao on 12/16/15.
//  Copyright © 2015 wujungao. All rights reserved.
//

#import "imageFromCache.h"
#import "SDImageCache.h"

@implementation ImageFromCache

+(UIImage *)imageFromCacheWithURLString:(NSString *)urlString{
    
    UIImage *cachedImage=[[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:urlString];
    
    if(cachedImage){
        
        return cachedImage;
        
    }
    
    cachedImage=[[SDImageCache sharedImageCache] imageFromDiskCacheForKey:urlString];
    
    if(cachedImage){
        
        return cachedImage;
    }
    
    return nil;
}

@end
